<div class="row searchLineWrap">
	<form class="form-horizontal" method="post" action="${cxt!}/admin/commissiondetail" id="searchForm">
	  <div class="col-md-12">
		  <div class="row">
		    <div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-3 control-label">${_res["commissionDetail.investor"]}</label>
		         <div class="col-md-9">
		            <input type="text" class="form-control" name="username" placeholder="${_res['commissionDetail.investor']}" value="${splitPage.queryParam['username']! }"/>
		         </div>
		       </div>
		    </div>
		   <div class="col-md-5">
		         <div class="form-group">
		           <label class="col-md-3 control-label">${_res["commissionDetail.commsiontype"]}</label>
		           <div class="col-md-9">
		               <#dict type="select" class="form-control" name="commssiontype"  dictCode="COMMISSION_TYPE" defaultValue="${splitPage.queryParam['commisstionType']!}"/><br>
		           </div>
		       </div>
		     </div>		    
		   
		  </div>
		  
		  <div class="row">
		   
		    <div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-3 control-label">${_res["system.startdate"]}</label>
		         <div class="col-md-9">
		            <input type="text" class="laydate-icon form-control layer-date" onclick="laydate()" name="begindate"  placeholder="${_res['system.startdate']}" value="${splitPage.queryParam['begindate']!}"/>
		         </div>
		       </div>
		    </div>
		    <div class="col-md-5">
		      <div class="form-group">
		         <label class="col-md-3 control-label">${_res["system.enddate"]}</label>
		         <div class="col-md-9">
		             <input type="text" class="laydate-icon form-control layer-date" onclick="laydate()" name="enddate"  placeholder="${_res['system.enddate']}" value="${splitPage.queryParam['enddate']!}"/>
		         </div>
		       </div>
		     </div>
		   

		    <div class="col-md-1">
		        <div class="form-group">
		          <button type="button" class="btn btn-primary pull-right" onclick="ajaxForm('content','searchForm')">
		          <i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}</button>
		        </div>
		    </div>
		  </div>
	  </div>
	</form>
</div>

<div class="row searchLineWrap">
	<% if(hasPrivilegeUrl("downloadsettlementdetail")){ %>
		<p><a href="javascript:void(0);" onClick="sumdownload();" class="btn btn-primary pull-left">${_res["system.export"]}</a><div class="clearfix"></div></p>
	<% } %>
	<table class="table table-bordered table-hover">
	    <thead>
	        <tr>
	            <th>${_res["customer.username"]}</th>
	            <th>${_res["settlement.pamount"]}</th>
	            <th>${_res["settlement.camount"]}</th>
	            <th>${_res["system.operator"]}</th>
	          </tr>
	    </thead>
	    <tbody>
	        <%for (settlement in splitPage.list!){%>
	         <tr class="gradeC">
	            <td>${settlement.username!}</td>
	            <td>${settlement.pcommission!}</td>
	            <td>${settlement.ccommission!}</td>
	            <td>
	               <% if(!isEmpty(settlement.pids!)){ %> 
	               
	               <% if(hasPrivilegeUrl("commissiondetail_list")){ %> 
	               <button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/admin/commissiondetail/list/${settlement.pids!}')">${_res["settlement.settlement.detail"]}</button>
				   <%}%>
				   <% if(hasPrivilegeUrl("settle")){ %> 		              
	               <button type="button" class="btn btn-sm btn-link" onClick="ajaxContentConfirm('/admin/commissiondetail/settle/${settlement.pids!}')">${_res["settlement.operater.settlement"]}</button>
	               <%}%>
	               <%}%>
	               
	               <% if(hasPrivilegeUrl("closed_commissiondetail")){ 
	               		if(!isEmpty(settlement.cids!)){
	               %> 
	               <button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/admin/commissiondetail/closedlist/${settlement.cids!}')">${_res["settlement.closed.detail"]}</button>
				   <%}}%>
	            </td>
	       </tr>
	       <%}%>
	    </tbody>
	</table>
	<div id="splitPageDiv">
		<#page formId="searchForm"/>
	</div>
	<#nav />
</div>
<script>
 function sumdownload(){
	var data = serializeObject("searchForm");
	var url = "/admin/commissiondetail/sumDownload";
	ajaxDownload(url,data);
	return true;
  }
  
 
</script>
 